#!/bin/bash
# Usage:
#   /share/go_setup.sh
#   source ~/.bashrc
# wget https://studygolang.com/dl/golang/go1.22.0.linux-amd64.tar.gz
tar zxf /share/go1.22.0.linux-amd64.tar.gz -C ~/tools/
echo 'export GOPROXY=https://goproxy.cn,direct' >> ~/.bashrc
echo 'export GOROOT=~/tools/go' >> ~/.bashrc
echo 'export PATH=$GOROOT/bin:$PATH' >> ~/.bashrc
